import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Privese from '../views/Privese.vue'
import Singer from '../views/Singer.vue'
import SingerInfo from '../views/SingerInfo.vue'
import SongSheet from '../views/SongSheet.vue'
import MV from '../views/Mv.vue'
import MvPrivece from '../views/MvPrivece.vue'
import NewMusic from '../views/NewMusic.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/privese/:id', component: Privese },
  { path: '/singer', component: Singer },
  { path: '/singerinfo/:id', component: SingerInfo },
  { path: '/songsheet', component: SongSheet },
  { path: '/mv', component: MV },
  { path: '/newmusic', component: NewMusic },
  { path: '/mv/privece/:id', component: MvPrivece },
]

const router = new VueRouter({
  routes,
  linkActiveClass: 'active'
})

router.beforeEach((to, from, next) => {

  next();
})


export default router
